Optimal. Leaf size=215 \[ -\frac {165 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{128 d}+\frac {91 a^2 \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {73 a^2 \cot (c+d x) \csc (c+d x)}{64 d \sqrt {a+a \sin (c+d x)}}+\frac {31 a^2 \cot (c+d x) \csc ^2(c+d x)}{80 d \sqrt {a+a \sin (c+d x)}}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)}}{40 d}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.53, antiderivative size = 215, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 9, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.290, Rules used = {2960, 2841,
21, 2852, 212, 3123, 3054, 3059, 2851} \begin {gather*} -\frac {165 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a \sin (c+d x)+a}}\right )}{128 d}+\frac {91 a^2 \cot (c+d x)}{128 d \sqrt {a \sin (c+d x)+a}}+\frac {31 a^2 \cot (c+d x) \csc ^2(c+d x)}{80 d \sqrt {a \sin (c+d x)+a}}+\frac {73 a^2 \cot (c+d x) \csc (c+d x)}{64 d \sqrt {a \sin (c+d x)+a}}-\frac {\cot (c+d x) \csc ^4(c+d x) (a \sin (c+d x)+a)^{3/2}}{5 d}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a \sin (c+d x)+a}}{40 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 212
Rule 2841
Rule 2851
Rule 2852
Rule 2960
Rule 3054
Rule 3059
Rule 3123
Rubi steps
\begin {align*} \int \cot ^4(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2} \, dx &=\int \csc ^2(c+d x) (a+a \sin (c+d x))^{3/2} \, dx+\int \csc ^6(c+d x) (a+a \sin (c+d x))^{3/2} \left (1-2 \sin ^2(c+d x)\right ) \, dx\\ &=-\frac {a^2 \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d}+\frac {\int \csc ^5(c+d x) \left (\frac {3 a}{2}-\frac {15}{2} a \sin (c+d x)\right ) (a+a \sin (c+d x))^{3/2} \, dx}{5 a}-a \int \frac {\csc (c+d x) \left (-\frac {3 a}{2}-\frac {3}{2} a \sin (c+d x)\right )}{\sqrt {a+a \sin (c+d x)}} \, dx\\ &=-\frac {a^2 \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)}}{40 d}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d}+\frac {\int \csc ^4(c+d x) \sqrt {a+a \sin (c+d x)} \left (-\frac {93 a^2}{4}-\frac {105}{4} a^2 \sin (c+d x)\right ) \, dx}{20 a}+\frac {1}{2} (3 a) \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {a^2 \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}+\frac {31 a^2 \cot (c+d x) \csc ^2(c+d x)}{80 d \sqrt {a+a \sin (c+d x)}}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)}}{40 d}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d}-\frac {1}{32} (73 a) \int \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)} \, dx-\frac {\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}\\ &=-\frac {3 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}-\frac {a^2 \cot (c+d x)}{d \sqrt {a+a \sin (c+d x)}}+\frac {73 a^2 \cot (c+d x) \csc (c+d x)}{64 d \sqrt {a+a \sin (c+d x)}}+\frac {31 a^2 \cot (c+d x) \csc ^2(c+d x)}{80 d \sqrt {a+a \sin (c+d x)}}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)}}{40 d}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d}-\frac {1}{128} (219 a) \int \csc ^2(c+d x) \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {3 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}+\frac {91 a^2 \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {73 a^2 \cot (c+d x) \csc (c+d x)}{64 d \sqrt {a+a \sin (c+d x)}}+\frac {31 a^2 \cot (c+d x) \csc ^2(c+d x)}{80 d \sqrt {a+a \sin (c+d x)}}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)}}{40 d}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d}-\frac {1}{256} (219 a) \int \csc (c+d x) \sqrt {a+a \sin (c+d x)} \, dx\\ &=-\frac {3 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{d}+\frac {91 a^2 \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {73 a^2 \cot (c+d x) \csc (c+d x)}{64 d \sqrt {a+a \sin (c+d x)}}+\frac {31 a^2 \cot (c+d x) \csc ^2(c+d x)}{80 d \sqrt {a+a \sin (c+d x)}}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)}}{40 d}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d}+\frac {\left (219 a^2\right ) \text {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\frac {a \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{128 d}\\ &=-\frac {165 a^{3/2} \tanh ^{-1}\left (\frac {\sqrt {a} \cos (c+d x)}{\sqrt {a+a \sin (c+d x)}}\right )}{128 d}+\frac {91 a^2 \cot (c+d x)}{128 d \sqrt {a+a \sin (c+d x)}}+\frac {73 a^2 \cot (c+d x) \csc (c+d x)}{64 d \sqrt {a+a \sin (c+d x)}}+\frac {31 a^2 \cot (c+d x) \csc ^2(c+d x)}{80 d \sqrt {a+a \sin (c+d x)}}-\frac {3 a \cot (c+d x) \csc ^3(c+d x) \sqrt {a+a \sin (c+d x)}}{40 d}-\frac {\cot (c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^{3/2}}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.26, size = 404, normalized size = 1.88 \begin {gather*} -\frac {a \csc ^{16}\left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sin (c+d x))} \left (1380 \cos \left (\frac {1}{2} (c+d x)\right )+320 \cos \left (\frac {3}{2} (c+d x)\right )+1296 \cos \left (\frac {5}{2} (c+d x)\right )+2010 \cos \left (\frac {7}{2} (c+d x)\right )-910 \cos \left (\frac {9}{2} (c+d x)\right )-1380 \sin \left (\frac {1}{2} (c+d x)\right )+8250 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)-8250 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (c+d x)+320 \sin \left (\frac {3}{2} (c+d x)\right )-1296 \sin \left (\frac {5}{2} (c+d x)\right )-4125 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))+4125 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (3 (c+d x))+2010 \sin \left (\frac {7}{2} (c+d x)\right )+910 \sin \left (\frac {9}{2} (c+d x)\right )+825 \log \left (1+\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (5 (c+d x))-825 \log \left (1-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin (5 (c+d x))\right )}{640 d \left (1+\cot \left (\frac {1}{2} (c+d x)\right )\right ) \left (\csc ^2\left (\frac {1}{4} (c+d x)\right )-\sec ^2\left (\frac {1}{4} (c+d x)\right )\right )^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 6.42, size = 180, normalized size = 0.84
method | result | size |
default | \(\frac {\left (1+\sin \left (d x +c \right )\right ) \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, \left (-825 \arctanh \left (\frac {\sqrt {-a \left (\sin \left (d x +c \right )-1\right )}}{\sqrt {a}}\right ) a^{5} \left (\sin ^{5}\left (d x +c \right )\right )+455 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {9}{2}} \sqrt {a}-2550 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {7}{2}} a^{\frac {3}{2}}+4992 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {5}{2}} a^{\frac {5}{2}}-3850 \left (-a \left (\sin \left (d x +c \right )-1\right )\right )^{\frac {3}{2}} a^{\frac {7}{2}}+825 \sqrt {-a \left (\sin \left (d x +c \right )-1\right )}\, a^{\frac {9}{2}}\right )}{640 a^{\frac {7}{2}} \sin \left (d x +c \right )^{5} \cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) | \(180\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 488 vs.
\(2 (187) = 374\).
time = 0.37, size = 488, normalized size = 2.27 \begin {gather*} \frac {825 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - {\left (a \cos \left (d x + c\right )^{5} + a \cos \left (d x + c\right )^{4} - 2 \, a \cos \left (d x + c\right )^{3} - 2 \, a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) - a\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, {\left (\cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right ) - 3\right )} \sqrt {a \sin \left (d x + c\right ) + a} \sqrt {a} - 9 \, a \cos \left (d x + c\right ) + {\left (a \cos \left (d x + c\right )^{2} + 8 \, a \cos \left (d x + c\right ) - a\right )} \sin \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1}\right ) - 4 \, {\left (455 \, a \cos \left (d x + c\right )^{5} - 275 \, a \cos \left (d x + c\right )^{4} - 982 \, a \cos \left (d x + c\right )^{3} + 174 \, a \cos \left (d x + c\right )^{2} + 399 \, a \cos \left (d x + c\right ) - {\left (455 \, a \cos \left (d x + c\right )^{4} + 730 \, a \cos \left (d x + c\right )^{3} - 252 \, a \cos \left (d x + c\right )^{2} - 426 \, a \cos \left (d x + c\right ) - 27 \, a\right )} \sin \left (d x + c\right ) - 27 \, a\right )} \sqrt {a \sin \left (d x + c\right ) + a}}{2560 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{3} - 2 \, d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right ) + d\right )} \sin \left (d x + c\right ) - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 248, normalized size = 1.15 \begin {gather*} -\frac {\sqrt {2} {\left (825 \, \sqrt {2} a \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - \frac {4 \, {\left (7280 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 20400 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 19968 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 7700 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 825 \, a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (2 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{5}}\right )} \sqrt {a}}{2560 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^4\,{\left (a+a\,\sin \left (c+d\,x\right )\right )}^{3/2}}{{\sin \left (c+d\,x\right )}^6} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________